package com.tg.data.http.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class DriveRecordItem implements Parcelable {
    private long time;

    public double getLatitude() {
        return latitude;
    }

    private double latitude;

    public double getLongitude() {
        return longitude;
    }

    private double longitude;

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    private double speed;

    private int brg;

    public int getBrg() {
        return brg;
    }

    protected DriveRecordItem(Parcel in) {
        time = in.readLong();
        latitude = in.readDouble();
        longitude = in.readDouble();
        speed = in.readDouble();
        brg = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(time);
        dest.writeDouble(latitude);
        dest.writeDouble(longitude);
        dest.writeDouble(speed);
        dest.writeInt(brg);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DriveRecordItem> CREATOR = new Creator<DriveRecordItem>() {
        @Override
        public DriveRecordItem createFromParcel(Parcel in) {
            return new DriveRecordItem(in);
        }

        @Override
        public DriveRecordItem[] newArray(int size) {
            return new DriveRecordItem[size];
        }
    };

}